package com.test.reactor.actor;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import akka.actor.AbstractActor;

@Component
@Scope(value = "prototype")
public class ReceiveActor extends AbstractActor {
	@Override
    public Receive createReceive() {
    	Receive build = receiveBuilder().matchAny(o -> {
            System.out.println(this.sender() + "接受到消息：" + o);
        }).build();
        return build;
    }
}
